package com.ynny.chapter05.entity;

import lombok.Data;
import lombok.ToString;

import java.util.List;

/**
 * 自定义resultType
 */
@Data
@ToString
public class UserDTO {

    private Integer userId;
    private String userName;
    private Integer age;
    private String imageUrl;

    private Integer addressId;
    private String city;
    private String address;

    private List<Address> addressList;

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public Integer getAddressId() {
        return addressId;
    }

    public void setAddressId(Integer addressId) {
        this.addressId = addressId;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }


    public List<Address> getAddressList() {
        return addressList;
    }

    public void setAddressList(List<Address> addressList) {
        this.addressList = addressList;
    }

    @Override
    public String toString() {
        return "UserDTO{" +
                "userId=" + userId +
                ", userName='" + userName + '\'' +
                ", age=" + age +
                ", imageUrl='" + imageUrl + '\'' +
                ", addressId=" + addressId +
                ", city='" + city + '\'' +
                ", address='" + address + '\'' +
                ", addressList=" + addressList +
                '}';
    }
}
